/**
 * 
 */
package com.mbengue.corp.apr.ra.core;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * @author MMB11447
 *
 */
@Entity
@Table(name = "evenement", schema = "apr_ra")
@NamedQuery(name = "findParTitre", query = "SELECT ad FROM Evenement ad WHERE ad.titre=:titre")
public class Evenement implements Serializable {
  private static final long serialVersionUID = 1L;
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(insertable = true, updatable = true)
  private long id;
  @Column
  private String titre;
  @Temporal(TemporalType.TIMESTAMP)
  @Column
  private Date debut;
  @Temporal(TemporalType.TIMESTAMP)
  @Column
  private Date fin;
  @Column(name = "descriptif", columnDefinition = "text")
  private String descriptif;

  /**
   * @return the id
   */
  public long getId() {
    return id;
  }

  /**
   * @param id the id to set
   */
  public void setId(long id) {
    this.id = id;
  }

  /**
   * @return the titre
   */
  public String getTitre() {
    return titre;
  }

  /**
   * @param titre the titre to set
   */
  public void setTitre(String titre) {
    this.titre = titre;
  }

  /**
   * @return the debut
   */
  public Date getDebut() {
    return debut;
  }

  /**
   * @param debut the debut to set
   */
  public void setDebut(Date debut) {
    this.debut = debut;
  }

  /**
   * @return the fin
   */
  public Date getFin() {
    return fin;
  }

  /**
   * @param fin the fin to set
   */
  public void setFin(Date fin) {
    this.fin = fin;
  }

  /**
   * @return the descriptif
   */
  public String getDescriptif() {
    return descriptif;
  }

  /**
   * @param descriptif the descriptif to set
   */
  public void setDescriptif(String descriptif) {
    this.descriptif = descriptif;
  }

  public Evenement(long id, String titre, Date debut, Date fin, String descriptif) {
    super();
    this.id = id;
    this.titre = titre;
    this.debut = debut;
    this.fin = fin;
    this.descriptif = descriptif;
  }

  public Evenement() {
  }
}
